/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Thai Ha Cong
 */

public class Receipt implements Serializable {
    private Integer idReceipt;
    private Date createTime;
    private int totalQuantity;
    private double totalAmount;
    private List<Receiptitem> receiptitemList;
    private Supplier supplier;
    private Staff staff;

    public Receipt() {
    }

    public Receipt(Integer idReceipt) {
        this.idReceipt = idReceipt;
    }

    public Receipt(Integer idReceipt, Date createTime, int totalQuantity, double totalAmount) {
        this.idReceipt = idReceipt;
        this.createTime = createTime;
        this.totalQuantity = totalQuantity;
        this.totalAmount = totalAmount;
    }
     public Receipt(Integer idReceipt, Date createTime, int totalQuantity, double totalAmount, Supplier supplier, Staff staff) {
        this.idReceipt = idReceipt;
        this.createTime = createTime;
        this.totalQuantity = totalQuantity;
        this.totalAmount = totalAmount;
        this.supplier = supplier;
        this.staff = staff;
    }
    public Receipt(List<Receiptitem> receiptitemList, Supplier supplier, Staff staff, Date createTime) {
        this.supplier = supplier;
        this.createTime = createTime;
        this.staff = staff;
        this.receiptitemList = receiptitemList;
    }
    
    public Integer getIdReceipt() {
        return idReceipt;
    }

    public void setIdReceipt(Integer idReceipt) {
        this.idReceipt = idReceipt;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getTotalQuantity() {
        return totalQuantity;
    }

    public void setTotalQuantity(int totalQuantity) {
        this.totalQuantity = totalQuantity;
    }

    public double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public List<Receiptitem> getReceiptitemList() {
        return receiptitemList;
    }

    public void setReceiptitemList(List<Receiptitem> receiptitemList) {
        this.receiptitemList = receiptitemList;
    }

    public Supplier getSupplier() {
        return supplier;
    }

    public void setSupplier(Supplier supplier) {
        this.supplier = supplier;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idReceipt != null ? idReceipt.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Receipt)) {
            return false;
        }
        Receipt other = (Receipt) object;
        if ((this.idReceipt == null && other.idReceipt != null) || (this.idReceipt != null && !this.idReceipt.equals(other.idReceipt))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Receipt[ idReceipt=" + idReceipt + " ]";
    }
    
}
